#include"priority_queue.h"

//默认大堆
void test1(){
	priority_queue<int> pq;
	pq.push(110);
	pq.push(20);
	pq.push(30);
	pq.push(44);
	pq.push(578);

	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << "\n";
}

//引入仿函数后建小堆
void test2(){
	priority_queue<int, vector<int>, greater<int>> pq;
	pq.push(110);
	pq.push(20);
	pq.push(30);
	pq.push(44);
	pq.push(578);

	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << "\n";
}

int main(){
	test1();
	test2();
	return 0;
}